#ifndef __CHAT_SERVLET_H__
#define __CHAT_SERVLET_H__

#include "../src/http/ws_servlet.h"
#include <memory>

namespace chat
{
    class ChatServlet : public johnsonli::http::WSServlet
    {
    public:
        typedef std::shared_ptr<ChatServlet> ptr;
        
        ChatServlet();
        ~ChatServlet();

        virtual int32_t onConnect(johnsonli::http::HttpRequest::ptr header
                              ,johnsonli::http::WSSession::ptr session);
        virtual int32_t onClose(johnsonli::http::HttpRequest::ptr header
                                ,johnsonli::http::WSSession::ptr session);
        virtual int32_t handle(johnsonli::http::HttpRequest::ptr header
                            ,johnsonli::http::WSFrameMessage::ptr msg
                            ,johnsonli::http::WSSession::ptr session);
    private:
    };
}

#endif